<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<script src="<%=path %>/js/common.js"></script>
<div class="panel-heading">
	<div class="pull-right">
		<a href="<%=path %>/admin/project/toInsert">发布项目</a>
	</div>
	<h3 class="panel-title">项目列表</h3>
</div>
<div class="bd clearfix">
	<form id="admin_project_choose_form" action="javascript:queryAdminProjectList(1);">
		<div class="filter-wrap">
			<dl class="clearfix invest-filter">
				<dt>项目名</dt>
				<dd class="clearfix">
					<ul class="col-sm-5"><input type="text" class="form-control" name="projectName" value="${paramMap.projectName}" placeholder="请输项目名关键词"></ul>
				</dd>
			</dl>
			<d:radio describe="项目类型" tableColumn="platform_type" fieldName="platformType" 
				value="${paramMap.platformType}" type="query" queryFunction="queryAdminProjectList"></d:radio>
		</div>
		<div class="text-center pb20">
			<button class="btn btn-primary">搜索</button>
		</div>
	</form>
</div>
<c:choose>
<c:when test="${!empty dataList && fn:length(dataList) ne 0}">
<table class="table">
	<thead>
		<tr>
			<th width="30%">项目名</th>
			<th width="30%">上线平台</th>
			<th width="10%">类型</th>
			<th width="20%">发布时间</th>
			<th width="10%">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="project" items="${dataList}" varStatus="index">
		<tr>
			<td class="title">
				<a href="<%=path %>/admin/project/toUpdate/${project.projectId}" target="_blank">${project.projectName}</a>
			</td>
			<td >
				${project.platformName}
			</td>
			<td>
				<c:choose>
					<c:when test="${project.platformType==1}">	
					<a href="#">股权</a>
					</c:when>
					
					<c:when test="${project.platformType==2}">	
					<a href="#">店铺</a>
					</c:when>
					
					<c:when test="${project.platformType==3}">	
					<a href="#">影视</a>
					</c:when>
				</c:choose>	
			</td>
			<td><fmt:formatDate value="${project.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			<td><a href="javascript:deleteProjectById('${project.projectId}')">删除</a></td>
		</tr>
		</c:forEach>
	</tbody>
</table>
<!-- 分页 -->
<p:pagination pageNo="${paramMap.pageNo}" pageCount="${paramMap.pageCount}" queryFunction="queryAdminProjectList" style="text-center"></p:pagination>
<!-- 分页 end -->
</c:when>
<c:otherwise>
	<table class="table">
		<thead>
			<tr>
				<th width="30%">项目名</th>
				<th width="30%">上线平台</th>
				<th width="20%">类型</th>
				<th width="20%">发布时间</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td colspan="5" align="center">
					暂无数据
				</td>
			</tr>
		</tbody>
	</table>
</c:otherwise>
</c:choose>